$(function(){
  //get elem
  let $pwd = $('#pwd'),
      $eye = $('#eye');

  //type : password or text
  
  $eye.mouseover(()=>{
    $pwd.attr('type','text');
    $eye.attr('src','');
  });
  $eye.mouseout(()=>{
    $pwd.attr('type','password');
    $eye.attr('src','');
  })
});
